import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_author/utils/rouces_util.dart';
import 'package:star_author/utils/utils.dart';
import 'package:star_author/widgets/button_widget.dart';

class MyErrorWidget extends StatelessWidget {
  const MyErrorWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
        color: Colors.white,
        alignment: Alignment.center,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.center,
          mainAxisSize: MainAxisSize.min,
          children: [
            Image.asset(
              RoucesUtil.getAssets('ic_error_logo_lt'),
              height: 123.w,
            ),
            SizedBox(
              height: 10.w,
            ),
            Text(
              "此处加载错误!",
              style: TextStyle(
                fontSize: 12.sp,
                color: rgba(153, 153, 153, 1),
              ),
            ),
            SizedBox(
              height: 10.w,
            ),
            ButtonWidget(
              type: ButtonType.bdYellow,
              height: 32,
              width: 108,
              onPressed: () {
                Get.back();
              },
              child: Text(
                "返回",
                style: TextStyle(
                  fontSize: 14.sp,
                  color: rgba(254, 186, 7, 1),
                ),
              ),
            ),
            SizedBox(
              height: 10.w,
            ),
          ],
        ));
  }
}
